package lt.f2g.base;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.request.mapper.parameter.PageParameters;

/**
 * Base page which contains basic configuration
 * @author Linas Jakaitis
 */
public abstract class BasePage extends WebPage {

    public BasePage() {
	this(null);
    }
    
    public BasePage(final PageParameters parameters) {
	super(parameters);
	Label currentDate = new Label("currentDate", new SimpleDateFormat("EEEE, MMMM dd, yyyy", new Locale("lt")).format(new Date()));
	add(currentDate);
    }
    
    @Override
    public void renderHead(IHeaderResponse response) {
	response.render(CssHeaderItem.forUrl("css/style.css"));
    }
}
